@import './weui/base/mixin/setOnepx.less';

.setLine(@c: #e5e5e5) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  height: 1px;
  border: 1px solid @c;
  color: @c;
  height: 200%;
  transform-origin: left top;
  transform: scale(0.5);
}

.setAzmLine() {
  content: " ";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  transform: scaleY(1);
  //background: #555 url("../assets/1px.png") repeat-x top;
  background: #555 url("") repeat-x top;
  background-size: 1px 1px;
}

.bodyStyle {
  .azm-1px {
    position: relative;
    &:before, &:after {
      .setAzmLine();
    }
    &-b:before {
      top: 0;
      transform-origin: 0 0;
    }
    &-t:after {
      bottom: 0;
      transform-origin: 0 100%;
    }
  }

  .vux-1px, .vux-1px-t, .vux-1px-b, .vux-1px-tb, .vux-1px-l, .vux-1px-r {
    position: relative;
  }

  .vux-1px {
    &:before {
      .setLine();
    }
  }

  .vux-1px-t {
    &:before {
      .setTopLine();
    }
  }

  .vux-1px-b {
    &:after {
      .setBottomLine();
    }
  }

  .vux-1px-tb {
    &:before {
      .setTopLine();
    }
    &:after {
      .setBottomLine();
    }
  }

  .vux-1px-l {
    &:before {
      .setLeftLine();
    }
  }

  .vux-1px-r {
    &:after {
      .setRightLine();
    }
  }
}
